﻿using Prism.Commands;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using corpus_platform.Data;

namespace corpus_platform.ViewModels
{
    public class ListedFrameElement : BindableBase
    {
        public ListedFrameElement(FrameElement frameElement)
        {
            FrameElement = frameElement;
            Name = frameElement.Name;
            IsCore = frameElement.IsCore;
            Information = frameElement.Information;
            if (IsCore)
            {
                IsSelected = true;
            }
            else
            {
                IsSelected = false;
            }
        }
        public FrameElement FrameElement { get; }
        public string Name { get; }
        public bool IsCore { get; }
        public string Information { get; }

        private bool isSelected;
        public bool IsSelected
        {
            get => isSelected;
            set => _ = SetProperty(ref isSelected, value);
        }
    }
}
